#include <stdio.h>
#include <dirent.h>

int main(int argc,char *argv[])
{
	DIR *dp;
        struct dirent *dirp;
	printf("start\n");
	if(argc!=2)
	{
		printf("缺少参数！");
	}
	if((dp=opendir(argv[1]))==NULL)
	{
		printf("路径错误！");
	}
	while((dirp=readdir(dp))!=NULL)
		printf("%s\n",dirp->d_name);

	closedir(dp);
	return (0);
}
